﻿@model ContosoUniversity.Models.Course

@{
   ViewBag.Title = "Edit";
}

<h2>Edit</h2>

@using (Html.BeginForm())
{
   @Html.AntiForgeryToken()
   @Html.ValidationSummary(true)

   <fieldset>
      <legend>Course</legend>

      @Html.HiddenFor(model => model.CourseID)

      <div class="editor-label">
         @Html.LabelFor(model => model.CourseID)
      </div>
      <div class="editor-field">
         @Html.DisplayFor(model => model.CourseID)
      </div>

      <div class="editor-label">
         @Html.LabelFor(model => model.Title)
      </div>
      <div class="editor-field">
         @Html.EditorFor(model => model.Title)
         @Html.ValidationMessageFor(model => model.Title)
      </div>

      <div class="editor-label">
         @Html.LabelFor(model => model.Credits)
      </div>
      <div class="editor-field">
         @Html.EditorFor(model => model.Credits)
         @Html.ValidationMessageFor(model => model.Credits)
      </div>

      <div class="editor-label">
         @Html.LabelFor(model => model.DepartmentID, "Department")
      </div>
      <div class="editor-field">
         @Html.DropDownList("DepartmentID", String.Empty)
         @Html.ValidationMessageFor(model => model.DepartmentID)
      </div>

      <p>
         <input type="submit" value="Save" />
      </p>
   </fieldset>
}

<div>
   @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
   @Scripts.Render("~/bundles/jqueryval")
}
